package cn.iocoder.yudao.module.erp.dal.mysql.accountplan;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.erp.dal.dataobject.accountplan.AccountPlanDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.erp.controller.admin.accountplan.vo.*;

/**
 * 对账单对应计划数据 Mapper
 *
 * @author mhc
 */
@Mapper
public interface AccountPlanMapper extends BaseMapperX<AccountPlanDO> {

    default PageResult<AccountPlanDO> selectPage(AccountPlanPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AccountPlanDO>()
                .eqIfPresent(AccountPlanDO::getAccountId, reqVO.getAccountId())
                .eqIfPresent(AccountPlanDO::getPlanId, reqVO.getPlanId())
                .orderByDesc(AccountPlanDO::getId));
    }

}